package com.msy.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @date 2020/11/22 - 21:23
 */
@Configuration
public class ConfigBean {   //Cofiguration -- spring applicationContext.xml

    @Bean
    @LoadBalanced //配置负载均衡实现RestTemplate
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
